package cn.lili.modules.system.client;

import cn.lili.modules.constant.ServiceConstant;
import cn.lili.modules.system.entity.dos.LiVip;
import cn.lili.modules.system.entity.dto.VipPageDto;
import cn.lili.modules.system.fallback.UrbanVipFallback;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@FeignClient(path = "${server.servlet.context-path}", name = ServiceConstant.USER_SERVICE, contextId = "urbanSubstationVip",fallback = UrbanVipFallback.class)
public interface UrbanVipClient {
    //获取会员列表
    @PostMapping("feign/vip/list")
    Page<LiVip> getVipList(@RequestBody VipPageDto dto);

    //会员冻结
    @PutMapping("feign/vip/freeze")
    void vipFreeze(@RequestParam String id);

    //会员解冻
    @PutMapping("feign/vip/vipUnfreeze")
    void vipUnfreeze(@RequestParam String id);

    //检查过期
    @GetMapping("feign/vip/everydaycheck")
    void CheckVip();
}
